﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ServerMonitor
{

    public delegate void ProcessRequestHandler(string page, string query, System.IO.TextWriter writer);

    class Program
    {
        static void Main(string[] args)
        {
            // 创建 Web 应用程序域
            Type type = typeof(ASPNET.Server.WebServer);

            ASPNET.Server.WebServer server
                = System.Web.Hosting.ApplicationHost.CreateApplicationHost(
                    type,
                    "/",
                    "e:\\study2010\\WebSite1\\"
                    )
                    as ASPNET.Server.WebServer;


            SimpleHttpListener listener = new SimpleHttpListener();
            listener.SetProcessRequest(server.ProcessRequest);

            listener.Run();


        }
    }
}
